package com.ay.wiki_plt.mapper;

import com.ay.wiki_plt.domain.Content;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ContentMapper {



    /*根据id查询分类*/
    @Select("select * from content where id = #{id}")
    Content getByIdCategory(Integer id);

    /*保存内容*/
    @Insert("insert into content(id, content) " +
            "VALUES (#{id},#{content})")
    void saveCategory(Content content);

    /*修改内容信息*/
    void updateCategory(Content content);

    /*删除内容*/
    void deleteByCategoryList(List<Long> ids);

    /*查询全部内容*/
    @Select("select * from content")
    List<Content> getCategoryList();

    @Insert("insert into content(id, content) values (#{id},#{content})")
    void insert(Content content);


    int updateBlob(Content content);

    /*文档内容查询*/
    @Select("select content from content where id = #{id}")
    String findContent(Long id);
}
